all: clean calc

CC			=	g++ -std=c++11
BISON		=	exp_lexer.c exp_parser.c exp_trans.c
DATA_M		=	data_memory.cpp

parser: calc.l calc.y
	bison -d calc.y
	flex calc.l

test-bison: clean parser test-bison.cpp $(DATA_M)
	$(CC) -o $@ test-bison.cpp $(BISON) $(DATA_M) -lm

clean:
	rm -f \
		exp_lexer.* exp_parser.* calc.tab.c

.PHONY: clean